#include <iostream>
#include <string>

class RentHouse
{
public:
    virtual void renthouse() = 0;
};

class Landlord : public RentHouse
{
public:
    void renthouse() override
    {
        std::cout << "将房子租出去" << std::endl;
    }
};

class Intermediary : public RentHouse
{
public:
    void renthouse() override
    {
        std::cout << "发布招租信息" << std::endl;
        std::cout << "带人看房" << std::endl;
        _landlord.renthouse();
        std::cout << "负责租后维修工作" << std::endl;
    }

private:
    Landlord _landlord;
};

int main()
{
    Intermediary intermediary;
    intermediary.renthouse();

    return 0;
}